<template>
    <div class="container">
        <div class="main">
            <div class="header felx">
                <p class="pHeader" :class="{ 'pHeader_active': currentView == 'OutStorageListView' }"
                    @click=" currentView = 'OutStorageListView'">出库明细</p>
                <p class="pHeader" :class="{ 'pHeader_active': currentView == 'PushStorageListView' }"
                    @click=" currentView = 'PushStorageListView'">入库明细</p>
            </div>
            <div class="borderBox">
                <div class="table_box">
                    <component :is="currentView" :key="currentView" :ref="currentView"></component>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import { httpService } from "@/utils/httpService";
import { ElConfigProvider, ElMessage } from "element-plus";
import { MoreFilled, CaretLeft, CaretRight, ArrowLeftBold, ArrowRightBold, ArrowDown } from "@element-plus/icons-vue";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
import PushStorageListView from "../../components/medicalProduct/PushStorageListView.vue"
import OutStorageListView from "../../components/medicalProduct/OutStorageListView.vue"


export default {
    name: "MedicalProductLogin",
    components: { ElMessage, MoreFilled, OutStorageListView, PushStorageListView, CaretLeft, CaretRight, ArrowLeftBold, ArrowRightBold, ArrowDown, ElConfigProvider },
    data() {
        return {
            page: 1,
            size: 10,
            total: 0,
            currentView: "OutStorageListView",
        };
    },
    setup() {
        return {
            locale: zhCn,
        };
    },
    computed: {},
    mounted() {
    },
    methods: {
        tableRowClassName({ row, rowIndex }) {
            return rowIndex % 2 === 1 ? 'warning-row' : '';
        },
        headerCellStyle() {
            return {
                background: '#f2f2f2',
            };
        },
        tableRowStyle({ row, rowIndex }) {
            if (rowIndex % 2 === 1) {
                return {
                    background: '#F5F5F5',
                };
            }
        },

        changePageSize(size) {
            this.pageSize = size;
            // this.getPadMessageList();
        },
        changeCurrentPage(page) {
            this.page = page;
            // this.getPadMessageList();
        },
    },
};
</script>
<style scoped>
* {
    padding: 0;
    margin: 0;
}

.flex {
    display: flex;
    align-items: center;
}

.container {
    width: calc(100vw - 30px);
    height: calc(100vh - 30px);
    padding: 15px 15px;
    background-color: #EEF7FB;
}

.main {
    width: calc(100% - 30px);
    height: calc(100% - 30px);
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
}

.header {
    height: 45px;
    /* background-color: chocolate; */
    display: flex;
    align-items: flex-end;
    /* justify-content: space-between; */
    border-bottom: 1px solid #DFDFDF;
}

.pHeader {
    color: #333333;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    padding-bottom: 10px;
    margin: 0 25px;
    cursor: pointer;
    transition: all 0.1s ease-in;
}

.pHeader_active {
    color: #333333;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 3px solid #6F72FF;
    transition: all 0.1s ease-in;
}


.header_btn {
    width: 99px;
    height: 32px;
    background-color: #6F72FF;
    border-radius: 5px;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    margin-right: 15px;
    cursor: pointer;
}

.header_btn img {
    width: 17px;
    height: 18px;
    margin-right: 5px;
}

.serachBox {
    color: #666666;
    font-size: 14px;
    width: 333px;
    height: 36px;
    border: 1px solid #D0D0D0;
    box-sizing: border-box;
    border-radius: 20px;
}

.serachBox .flex {
    justify-content: center;
    border-right: 1px solid #D0D0D0;
    margin-right: 10px;
    padding: 0 5px 0 15px;
    color: #666666;
    cursor: pointer;
}

.serachBox input {
    height: calc(100% - 4px);
    border: none;
    flex: 1;
}

.serachBox button {
    width: 59px;
    height: 30px;
    border-radius: 15px;
    border: none;
    background-color: #6F72FF;
    color: #fff;
    font-size: 14px;
    margin-right: 2px;
}


.borderBox {
    height: calc(100% - 60px);
    border: 1px solid #DFDFDF;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 15px;
}

.borderTop {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workList {
    display: flex;
}

.workList p {
    color: #666;
    font-size: 14px;
    margin-left: 20px;
}

.workList p span {
    color: #6F72FF;
}

.borderTop .flex {
    margin-right: 20px;
}

.borderTop_btn {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666666;
    margin-left: 40px;
    cursor: pointer;
}

.header_icon {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table_box {
    width: calc(100vw - 283px);
    height: calc(100% - 99px);
    /* background-color: slategrey; */
}

.el-table {
    /* margin-left: -1px; */
}

.rotate {
    transform: rotate(90deg);
}


.el-scrollbar__bar {
    z-index: 11;
    overflow-x: hidden;
    position: sticky;
}

.el-table.el-table--border {
    overflow: unset;
}


.pageBox {
    background-color: #f6f6f6;
    padding: 5px 0;
    border-top: 1px solid #e7e7e7;
    border-radius: 0 0 5px 5px;
}

.el-pagination {
    margin-left: 10px;
}

.pageBox {
    justify-content: space-between;
}

.pageBox .flex {
    color: #666;
    font-size: 14px;
    margin-right: 10px;
}

.pageBox .flex p {
    color: #666;
    font-size: 14px;
    margin-right: 20px;
}


.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.5s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}
</style>